﻿using System;
using System.Collections.Generic;
using System.Linq;
using Sendz.Domain;

namespace Sendz.Model
{
    public interface IUserRepository
    {
        // Users

        // Don't allow default added users to be admin, consider a different method
        Guid CreateTempUser(Guid userKey, string name, string email, Guid invitedByUserKey);

        Guid TryLoginGetUserKey(string username, string password);

        User GetUserByName(string username);

        User GetUserByEmail(string email);

        List<User> GetUsers();

        bool SaveUser(User user);

        User GetUserByKey(Guid userKey);

        bool RemoveUser(Guid userKey);

        bool ResetUserPassword(Guid userKey, string newPassword);

        bool UpdateUserResponses(Guid userKey, int newResponses);

        bool UpdateUserInvites(Guid userKey, int newInvites);

        // Validated Emails

        bool IsEmailValidated(Guid userKey, string email);

        Guid CreateEmailValidation(Guid userKey, string email);

        bool ValidateEmailByKey(Guid validationKey);
    }
}
